/* IFTA Calculator Styles */

/* Remove Input Spinners */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* IFTA Section */
.ifta-section {
    padding: 8rem 0 4rem;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1f2e 0%, #0f1419 100%);
}

.ifta-section .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.ifta-section h1 {
    font-size: 3rem;
    color: #B4D7CE;
    margin-bottom: 1rem;
    text-align: center;
}

.ifta-section .subtitle {
    color: #7fa99b;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.15), rgba(201, 169, 97, 0.05));
    border: 2px solid #C9A961;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.info-box h3 {
    color: #C9A961;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.info-box p {
    color: #B4D7CE;
    margin-bottom: 15px;
    line-height: 1.6;
}

.info-box ul {
    color: #B4D7CE;
    margin-left: 25px;
    line-height: 1.8;
}

.info-box strong {
    color: #C9A961;
}

.info-box a {
    color: #39A078;
    text-decoration: underline;
}

/* Form Section */
.form-section {
    background-color: #2c3642;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.section-header {
    background: linear-gradient(135deg, #39A078, #2d8060);
    color: white;
    padding: 15px 20px;
    font-size: 1.2rem;
    font-weight: bold;
}

.header-with-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header-actions-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Period Selector */
.period-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 25px;
    align-items: end;
}

.period-info {
    background-color: #1a1f2e;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #C9A961;
}

.period-info strong {
    color: #C9A961;
    display: block;
    margin-bottom: 5px;
}

.period-info span {
    color: #B4D7CE;
    font-size: 1.1rem;
}

/* Dashboard */
.ifta-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: linear-gradient(135deg, #2c3642 0%, #232a35 100%);
    border: 2px solid #3d4654;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    border-color: #39A078;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.dashboard-card.tax-card {
    border-color: #C9A961;
}

.dashboard-card.tax-card:hover {
    border-color: #C9A961;
}

.dashboard-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.dashboard-label {
    color: #7fa99b;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.dashboard-value {
    color: #39A078;
    font-size: 2.2rem;
    font-weight: bold;
}

/* IFTA Form */
.ifta-form {
    padding: 25px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    color: #B4D7CE;
    font-size: 0.95rem;
    font-weight: 500;
}

.form-group input,
.form-group select {
    padding: 12px;
    border: 2px solid #3d4654;
    border-radius: 6px;
    background-color: #1a1f2e;
    color: #B4D7CE;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #39A078;
}

.form-group input[readonly] {
    background-color: #2c3642;
    cursor: not-allowed;
}

.form-group small {
    color: #7fa99b;
    font-size: 0.85rem;
}

/* Buttons */
.btn-add {
    padding: 14px 30px;
    background: linear-gradient(135deg, #39A078, #2d8060);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(57, 160, 120, 0.3);
}

.btn-export,
.btn-danger {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-export {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-export:hover,
.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

/* State Table */
.state-table-container {
    overflow-x: auto;
    padding: 25px;
}

.state-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #1a1f2e;
    border-radius: 8px;
    overflow: hidden;
}

.state-table thead {
    background: linear-gradient(135deg, #39A078, #2d8060);
}

.state-table th {
    padding: 15px;
    text-align: left;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.state-table td {
    padding: 12px 15px;
    color: #B4D7CE;
    border-bottom: 1px solid #2c3642;
}

.state-table tbody tr:hover {
    background-color: #232a35;
}

.state-table .no-data td {
    text-align: center;
    padding: 40px;
    color: #7fa99b;
}

.state-table tfoot {
    background-color: #2c3642;
    font-weight: bold;
}

.state-table tfoot th,
.state-table tfoot td {
    padding: 15px;
    color: #C9A961;
    font-size: 1.1rem;
    border-top: 2px solid #39A078;
}

.hidden {
    display: none;
}

/* Delete Button in Table */
.btn-delete {
    background: transparent;
    border: none;
    color: #e74c3c;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
    transition: all 0.3s ease;
}

.btn-delete:hover {
    transform: scale(1.2);
    color: #ff6b6b;
}

/* Tax Due Colors */
.tax-positive {
    color: #39A078 !important;
}

.tax-negative {
    color: #e74c3c !important;
}

/* Tips Section */
.tips-section {
    margin-top: 40px;
    padding: 30px;
    background-color: #2c3642;
    border-radius: 12px;
}

.tips-section h3 {
    color: #B4D7CE;
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.tip-card {
    background-color: #1a1f2e;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #39A078;
}

.tip-card h4 {
    color: #39A078;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.tip-card p {
    color: #B4D7CE;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Toast Notifications */
.ifta-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #39A078;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1100;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
}

.ifta-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.ifta-toast.error {
    background-color: #e74c3c;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ifta-section {
        padding: 6rem 0 2rem;
    }

    .ifta-section h1 {
        font-size: 2rem;
    }

    .ifta-dashboard {
        grid-template-columns: 1fr;
    }

    .period-selector {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }

    .header-with-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions-group {
        width: 100%;
        flex-direction: column;
    }

    .btn-export,
    .btn-danger {
        width: 100%;
    }

    .state-table-container {
        padding: 15px;
    }

    .state-table {
        font-size: 0.85rem;
    }

    .state-table th,
    .state-table td {
        padding: 8px 6px;
    }
}
